home *** CD-ROM | disk | FTP | other *** search
/ All for Cell Phones: Sony Ericsson / Sony-Ericsson 2004.iso / Java / DestroyNCatch / DestroyNCatch.jar / SpriteVector.class (.txt) < prev    next >
Encoding:
Java Class File  |  2002-06-21  |  938 b   |  36 lines

  1. import java.util.Vector;
  2. import javax.microedition.lcdui.Graphics;
  3.  
  4. public class SpriteVector extends Vector {
  5.    // $FF: renamed from: a AutoSprite
  6.    AutoSprite field_0 = null;
  7.  
  8.    public void draw(Graphics var1) {
  9.       if (!((Vector)this).isEmpty()) {
  10.          for(int var2 = 0; var2 < ((Vector)this).size(); ++var2) {
  11.             this.field_0 = (AutoSprite)((Vector)this).elementAt(var2);
  12.             this.field_0.draw(var1);
  13.          }
  14.       }
  15.  
  16.    }
  17.  
  18.    public void tick() {
  19.       if (!((Vector)this).isEmpty()) {
  20.          for(int var1 = 0; var1 < ((Vector)this).size(); ++var1) {
  21.             this.field_0 = (AutoSprite)((Vector)this).elementAt(var1);
  22.             if (this.field_0.getState() == 1) {
  23.                ((Vector)this).removeElementAt(var1);
  24.             } else if (this.field_0.toString() == "balloon") {
  25.                this.field_0.tick(true);
  26.             } else if (this.field_0.toString() == "missile") {
  27.                this.field_0.tick(false);
  28.             } else if (this.field_0.toString() == "box") {
  29.                this.field_0.tick(false);
  30.             }
  31.          }
  32.       }
  33.  
  34.    }
  35. }
  36.